Optimal. Leaf size=95 \[ \frac{d-2 e+4 f-8 g}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f+g)+\frac{1}{48} \log (2-x) (d+2 e+4 f+8 g)+\frac{1}{6} \log (x+1) (d-e+f-g)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f-8 g) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.221323, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.049, Rules used = {1586, 6742} \[ \frac{d-2 e+4 f-8 g}{12 (x+2)}-\frac{1}{18} \log (1-x) (d+e+f+g)+\frac{1}{48} \log (2-x) (d+2 e+4 f+8 g)+\frac{1}{6} \log (x+1) (d-e+f-g)-\frac{1}{144} \log (x+2) (19 d-26 e+28 f-8 g) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 6742
Rubi steps
\begin{align*} \int \frac{\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac{d+e x+f x^2+g x^3}{(2+x)^2 \left (2-x-2 x^2+x^3\right )} \, dx\\ &=\int \left (\frac{d+2 e+4 f+8 g}{48 (-2+x)}+\frac{-d-e-f-g}{18 (-1+x)}+\frac{d-e+f-g}{6 (1+x)}+\frac{-d+2 e-4 f+8 g}{12 (2+x)^2}+\frac{-19 d+26 e-28 f+8 g}{144 (2+x)}\right ) \, dx\\ &=\frac{d-2 e+4 f-8 g}{12 (2+x)}-\frac{1}{18} (d+e+f+g) \log (1-x)+\frac{1}{48} (d+2 e+4 f+8 g) \log (2-x)+\frac{1}{6} (d-e+f-g) \log (1+x)-\frac{1}{144} (19 d-26 e+28 f-8 g) \log (2+x)\\ \end{align*}
Mathematica [A] time = 0.0466772, size = 90, normalized size = 0.95 \[ \frac{1}{144} \left (\frac{12 (d-2 e+4 f-8 g)}{x+2}+24 \log (-x-1) (d-e+f-g)-8 \log (1-x) (d+e+f+g)+3 \log (2-x) (d+2 e+4 f+8 g)+\log (x+2) (-19 d+26 e-28 f+8 g)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 146, normalized size = 1.5 \begin{align*}{\frac{13\,\ln \left ( 2+x \right ) e}{72}}-{\frac{7\,\ln \left ( 2+x \right ) f}{36}}+{\frac{\ln \left ( 2+x \right ) g}{18}}-{\frac{19\,\ln \left ( 2+x \right ) d}{144}}+{\frac{d}{24+12\,x}}-{\frac{e}{12+6\,x}}+{\frac{f}{6+3\,x}}-{\frac{2\,g}{6+3\,x}}+{\frac{\ln \left ( 1+x \right ) d}{6}}-{\frac{\ln \left ( 1+x \right ) e}{6}}+{\frac{\ln \left ( 1+x \right ) f}{6}}-{\frac{\ln \left ( 1+x \right ) g}{6}}+{\frac{\ln \left ( x-2 \right ) d}{48}}+{\frac{\ln \left ( x-2 \right ) e}{24}}+{\frac{\ln \left ( x-2 \right ) f}{12}}+{\frac{\ln \left ( x-2 \right ) g}{6}}-{\frac{\ln \left ( x-1 \right ) d}{18}}-{\frac{\ln \left ( x-1 \right ) e}{18}}-{\frac{\ln \left ( x-1 \right ) f}{18}}-{\frac{\ln \left ( x-1 \right ) g}{18}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.988366, size = 109, normalized size = 1.15 \begin{align*} -\frac{1}{144} \,{\left (19 \, d - 26 \, e + 28 \, f - 8 \, g\right )} \log \left (x + 2\right ) + \frac{1}{6} \,{\left (d - e + f - g\right )} \log \left (x + 1\right ) - \frac{1}{18} \,{\left (d + e + f + g\right )} \log \left (x - 1\right ) + \frac{1}{48} \,{\left (d + 2 \, e + 4 \, f + 8 \, g\right )} \log \left (x - 2\right ) + \frac{d - 2 \, e + 4 \, f - 8 \, g}{12 \,{\left (x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 6.17876, size = 406, normalized size = 4.27 \begin{align*} -\frac{{\left ({\left (19 \, d - 26 \, e + 28 \, f - 8 \, g\right )} x + 38 \, d - 52 \, e + 56 \, f - 16 \, g\right )} \log \left (x + 2\right ) - 24 \,{\left ({\left (d - e + f - g\right )} x + 2 \, d - 2 \, e + 2 \, f - 2 \, g\right )} \log \left (x + 1\right ) + 8 \,{\left ({\left (d + e + f + g\right )} x + 2 \, d + 2 \, e + 2 \, f + 2 \, g\right )} \log \left (x - 1\right ) - 3 \,{\left ({\left (d + 2 \, e + 4 \, f + 8 \, g\right )} x + 2 \, d + 4 \, e + 8 \, f + 16 \, g\right )} \log \left (x - 2\right ) - 12 \, d + 24 \, e - 48 \, f + 96 \, g}{144 \,{\left (x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08241, size = 122, normalized size = 1.28 \begin{align*} -\frac{1}{144} \,{\left (19 \, d + 28 \, f - 8 \, g - 26 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac{1}{6} \,{\left (d + f - g - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac{1}{18} \,{\left (d + f + g + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac{1}{48} \,{\left (d + 4 \, f + 8 \, g + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac{d + 4 \, f - 8 \, g - 2 \, e}{12 \,{\left (x + 2\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]